<include file="public:header"/>

<div class="seltpye_x">
    <div class="left">完成状态</div>
    <div class="right">
        <a href="{:P(array('is_paid'=>''))}" <empty name='Think.get.is_paid'>class="select"</empty>>不限</a>
        <a href="{:P(array('is_paid'=>'2'))}" <eq name='Think.get.is_paid' value='2'>class="select"</eq>>已完成</a>
        <a href="{:P(array('is_paid'=>'1'))}" <eq name='Think.get.is_paid' value='1'>class="select"</eq>>待付款</a>
        <a href="{:P(array('is_paid'=>'3'))}" <eq name='Think.get.is_paid' value='3'>class="select"</eq>>已取消</a>
        <div class="clear"></div>
    </div>
    <div class="clear"></div>
</div>
<div class="seltpye_x">
    <div class="left">付款方式</div>
    <div class="right">
        <a href="{:P(array('typename'=>''))}" <empty name='Think.get.typename'>class="select"</empty>>不限</a>
        <a href="{:P(array('typename'=>'points'))}" <eq name='Think.get.typename' value='points'>class="select"</eq>>{:C('qscms_points_byname')}支付</a>
        <volist name="payment_list" id="vo">
            <a href="{:P(array('typename'=>$vo['typename']))}" <eq name='Think.get.typename' value='$vo.typename'>class="select"</eq>>{$vo['byname']}</a>
        </volist>

        <div class="clear"></div>
    </div>
    <div class="clear"></div>
</div>
<div class="seltpye_x">
    <div class="left">添加时间</div>
    <div class="right">
        <a href="{:P(array('settr'=>''))}" <eq name='Think.get.settr' value=''>class="select"</eq>>不限</a>
        <a href="{:P(array('settr'=>'3'))}" <eq name='Think.get.settr' value='3'>class="select"</eq>>三天内</a>
        <a href="{:P(array('settr'=>'7'))}" <eq name='Think.get.settr' value='7'>class="select"</eq>>一周内</a>
        <a href="{:P(array('settr'=>'30'))}" <eq name='Think.get.settr' value='30'>class="select"</eq>>一月内</a>
        <a href="{:P(array('settr'=>'180'))}" <eq name='Think.get.settr' value='180'>class="select"</eq>>半年内</a>
        <a href="{:P(array('settr'=>'360'))}" <eq name='Think.get.settr' value='360'>class="select"</eq>>一年内</a>
        <div class="clear"></div>
    </div>
    <div class="clear"></div>
</div>

<form id="form1" name="form1" method="post" action="{:U('Order/order_cancel')}">
    <input name="_k_v" type="hidden" value="{$Think.get._k_v}">
    <div class="list_th">
        <div class="td" style=" width:10%;">
            <label id="chkAll" class="left_padding">
                <input type="checkbox" name="chkAll" id="chk" title="全选/反选"/>全选
            </label>
        </div>
        <div class="td" style=" width:10%;">金额</div>
        <div class="td" style=" width:35%;">说明</div>
        <div class="td center" style=" width:15%;">单号</div>
        <div class="td center" style=" width:10%;">申请时间</div>
        <div class="td center" style=" width:10%;">支付方式</div>
        <div class="td" style=" width:10%;">操作</div>
        <div class="clear"></div>
    </div>

    <volist name="list" id="vo">
        <div class="list_tr link_black">
            <div class="td" style=" width:10%;">
                <div class="left_padding striking">
                    <if condition="$vo['is_paid'] eq 1">
                        <input name="id[]" type="checkbox" value="{$vo['id']}"  />
                        <span style="color: #FF6600">待付款...</span>
                    <elseif condition="$vo['is_paid'] eq 2" />
                        <input name="id[]" type="checkbox" value="{$vo['id']}" disabled="disabled"/>
                        <span style="color: #009900;">已完成</span>
                    <else />
                        <input name="id[]" type="checkbox" value="{$vo['id']}" disabled="disabled"/>
                        <span style="color: #999;">已取消</span>
                    </if>
                </div>
            </div>
            <div class="td" style=" width:10%;">￥<strong>{$vo['amount']}</strong> 元</div>
            <div class="td" style=" width:35%;">{$vo['description']}</div>
            <div class="td center" style=" width:15%;">{$vo['oid']}</div>
            <div class="td center" style=" width: 10%;">{:admin_date($vo['addtime'])}</div>
            <div class="td center" style=" width:10%;">{$vo['payment_cn']}</div>
            <div class="td edit" style=" width:10%;">
                <if condition="$vo['is_paid'] eq 2 || $vo['is_paid'] eq 3">
                    <a href="{:U('Order/order_show',array('uid'=>$vo['uid'],'id'=>$vo['id'],'_k_v'=>$_GET['_k_v']))}">查看</a>
                </if>
                <if condition="$vo['is_paid'] eq 1">
                    <a href="{:U('Order/order_set',array('uid'=>$vo['uid'],'id'=>$vo['id'],'_k_v'=>$_GET['_k_v']))}">设置</a>
                    <a href="{:U('Order/order_cancel',array('uid'=>$vo['uid'],'id'=>$vo['id'],'_k_v'=>$_GET['_k_v']))}" onclick="return confirm('你确定要取消吗？')" class="gray">取消</a>
                </if>
            </div>
            <div class="clear"></div>
        </div>
    </volist>
</form>

<empty name="list">
    <div class="list_empty">没有任何信息！</div>
</empty>

<div class="list_foot">
    <div class="btnbox">
        <input type="button" class="admin_submit" id="ButAdd" value="添加会员" onclick="window.location.href='{:U('add')}'"/>
        <input type="button" class="admin_submit" id="ButDel" value="删除会员"/>
        <input type="button" class="admin_submit" id="AddConsultant" value="设置顾问"/>
    </div>

    <div class="footso">
        <form action="?" method="get">
            <div class="sobox">
                <input type="hidden" name="m" value="{:C('admin_alias')}">
                <input type="hidden" name="c" value="{:CONTROLLER_NAME}">
                <input type="hidden" name="a" value="{:ACTION_NAME}">
                <input name="key" type="text" class="sinput" value="{$Think.get.key}"/>
                <input name="key_type" id="J_key_type_id" type="hidden" value="{$Think.get.key_type|default='1'}" />
                <input name="key_type_cn" id="J_key_type_cn" type="hidden" value="{$Think.get.key_type_cn|default='用户名'}"/>
                <input name="" type="submit" value="" class="sobtn"/>
                <div class="sotype" id="J_key_click">{$Think.get.key_type_cn|default='用户名'}</div>
                <div class="mlist" id="J_mlist">
                    <ul>
                        <li id="1" title="用户名">用户名</li>
                        <li id="2" title="UID">UID</li>
                        <li id="3" title="email">email</li>
                        <li id="4" title="手机号">手机号</li>
                    </ul>
                </div>
            </div>
        </form>
    </div>
</div>
<div class="pages">{$page}</div>

</div>
<include file="public:footer"/>

</body>
<script type="text/javascript">
    $(document).ready(function () {
        /*
        //点击批量设置顾问
        $("#AddConsultant").click(function(){
            <if condition="$Think.get.subsite_id eq '' and $apply['Subsite']">
                alert('请选择所属分站！');
                return !1;
            </if>
            $("form[name=form1]").attr("action","{:U('consultant_install',array('subsite_id'=>$_GET['subsite_id']))}");
            $("form[name=form1]").submit()
        });*/
        //发送短信
        $(".ajax_send_sms").click(function () {
            $('.modal_backdrop').remove();
            $('.modal').remove();
            var qsDialog = $(this).dialog({
                title: '发送短信',
                loading: true,
                footer : false
            });
            var param = $(this).attr('parameter');
            var url = "{:U('Ajax/ajax_send_sms')}&" + param;
            $.getJSON(url, function (result) {
                qsDialog.setContent(result.data);
            });
        });
        //发送邮件
        $(".ajax_send_email").click(function () {
            $('.modal_backdrop').remove();
            $('.modal').remove();
            var qsDialog = $(this).dialog({
                title: '发送邮件',
                loading: true,
                footer : false
            });
            var param = $(this).attr('parameter');
            var url = "{:U('Ajax/ajax_send_email')}&" + param;
            $.getJSON(url, function (result) {
                qsDialog.setContent(result.data);
            });
        });
        //审核日志
        $(".login_log").click(function () {
            var qsDialog = $(this).dialog({
                title: '登录日志',
                loading: true,
                footer : false
            });
            var param = $(this).attr('parameter');
            var url = "{:U('Ajax/login_log')}&" + param;
            $.getJSON(url, function (result) {
                qsDialog.setContent(result.data);
            });
        });
        //管理
        $(".userinfo").click(function () {
            var qsDialog = $(this).dialog({
                title: '管理',
                loading: true,
                footer : false
            });
            var param = $(this).attr('parameter');
            var url = "{:U('Ajax/userinfo')}&" + param;
            $.getJSON(url, function (result) {
                qsDialog.setContent(result.data);
            });
        });
        //批量删除
        $("#ButDel").click(function () {
            var data = $("form[name=form1]").serialize();
            if(data.length == 0){
                disapperTooltip('remind','请选择会员！');
            } else {
                var qsDialog = $(this).dialog({
                    title: '删除会员',
                    loading: true,
                    footer : false
                });
                var url = "{:U('Ajax/delete_company_members')}";
                $.post(url, data, function (result) {
                    if(result.status == 1){
                        qsDialog.setContent(result.data);
                    } else {
                        qsDialog.hide();
                        disapperTooltip('remind',result.msg);
                    }
                });
            }
        });
    });
</script>
</html>